#version 330 core
layout (location = 0) in vec3 position;
layout (location = 1) in vec3 pNormal;

uniform mat4 p;
uniform mat4 v;
uniform mat4 m;
uniform vec4 color;
out highp vec4 outColor;
out highp vec3 normal;
out vec3 FragPos;


void main()
{
   FragPos = vec3(m * vec4(position, 1.0));
   normal = mat3(transpose(inverse(m))) * pNormal;
   gl_Position = p * v * m * vec4(position, 1.0);
   outColor = color;
}